#include "slider.h"
#include "sliderplugin.h"

#include <QtPlugin>

SliderPlugin::SliderPlugin(QObject *parent)
    : QObject(parent)
{
    m_initialized = false;
}

void SliderPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (m_initialized)
        return;

    // Add extension registrations, etc. here

    m_initialized = true;
}

bool SliderPlugin::isInitialized() const
{
    return m_initialized;
}

QWidget *SliderPlugin::createWidget(QWidget *parent)
{
    return new Slider(parent);
}

QString SliderPlugin::name() const
{
    return QLatin1String("Slider");
}

QString SliderPlugin::group() const
{
    return QLatin1String("");
}

QIcon SliderPlugin::icon() const
{
    return QIcon(QLatin1String(":/slider.png"));
}

QString SliderPlugin::toolTip() const
{
    return QLatin1String("");
}

QString SliderPlugin::whatsThis() const
{
    return QLatin1String("");
}

bool SliderPlugin::isContainer() const
{
    return false;
}

QString SliderPlugin::domXml() const
{
    return QLatin1String("<widget class=\"Slider\" name=\"slider\">\n</widget>\n");
}

QString SliderPlugin::includeFile() const
{
    return QLatin1String("slider.h");
}
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(sliderplugin, SliderPlugin)
#endif // QT_VERSION < 0x050000
